﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebSite.Master" AutoEventWireup="true"
    CodeBehind="Exam.aspx.cs" Inherits="RN.ERP.Web.Person.Exam" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" />
    <script type="text/javascript" src="../Scripts/ligerUI/js/ligerui.all.js"></script>
    <style type="text/css">
        .Changebtn
        {
            width: 68px;
            height: 25px;
            color: #fff;
            line-height: 22px;
            text-decoration: none;
            display: block;
            background: url(../images/xtbiao.jpg) left top no-repeat;
            color: #fff;
            text-align: center;
            cursor: pointer;
        }
    </style>
    <script type="text/javascript">

        function OpenAlert(text) {
            $.ligerDialog.warn(text);
            return false;
        }
        /*打开窗口*/
        function ShowViewForm(empGuid1) {
            var rType = "<%=RoleType %>";
            opt = 2;
            $.ligerDialog.open({ url: "../Person/PersonEmpView.aspx?empGuid=" + empGuid1 + "&opt=" + opt, width: 1080, height: 800, title: '', buttons: [{ text: '关闭', onclick: function (item, dialog) { dialog.close(); } }] });
            return false;
        }
        function Exam(empguid, corpguid) {
            var AreaCode = "<%=AreaCode %>";
            $.ligerDialog.confirm('确认报名参加考试？', function (yes) {
                if (yes == true) {
                    $.ajax({
                        async: false,
                        url: "Exam.aspx/AddExam",
                        data: "{ 'empguid':'" + empguid + "','corpguid':'" + corpguid + "','AreaCode':'" + AreaCode + "'}",
                        type: "post",
                        cache: false,
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (data) {
                            var json = eval('(' + data.d + ')');
                            $.ligerDialog.warn(json.Message, "", RefreshWin);
                        }
                    });
                }
            });
        }
        function RefreshWin() {
            location.href = location.href;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgPersonList" LoadingPanelID="gridLoadingPanel">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <input id="hdSearchEndStr" type="hidden" runat="server" value="" />
    <input id="hdClassId" type="hidden" runat="server" value="0" />
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
            <td width="19" class="xx_m">
                <img src="../images/xx_l.jpg" width="19" height="33" />
            </td>
            <td width="24" class="xx_m">
                <img src="../images/xx_icon.jpg" width="24" height="33" />
            </td>
            <td width="1250" class="xx_m">
                人员列表
            </td>
            <td width="14">
                <img src="../images/xx_r.jpg" width="14" height="33" />
            </td>
        </tr>
        <tr id="UserManagerSelect" runat="server">
            <td class="left_con">
                &nbsp;
            </td>
            <td colspan="2" style="padding-left: 6px; padding-right: 6px;" valign="top">
                <!--#订单列表-->
                <div class="xian">
                    <div class="about_title">
                        人员列表</div>
                    <div class="i-con-cn">
                        <asp:LinkButton ID="lbtnEmpSreach" runat="server" CssClass="xtbiao" OnClick="lbtnEmpSreach_Click">查 询</asp:LinkButton>
                    </div>
                </div>
                <div style="padding-bottom: 5px; background-color: #eaeaea; width: 100%; padding-top: 5px;
                    margin-bottom: 10px;">
                    <table>
                        <tr>
                            <td align="center" style="width: 40px;">
                                姓名
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmpName" runat="server" MaxLength="10" Width="100px" CssClass="text_css"></asp:TextBox>
                            </td>
                            <td style="width: 50px;" align="center">
                                身份证
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmpIdCard" runat="server" MaxLength="30" CssClass="text_css"
                                    Width="150px"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <telerik:RadGrid ID="rgPersonList" runat="server" OnNeedDataSource="rgPersonList_NeedDataSource"
                        AutoGenerateColumns="False" AllowPaging="True" AllowCustomPaging="True" AllowSorting="True"
                        ShowStatusBar="True" CellSpacing="0" Culture="zh-CN" GridLines="None">
                        <ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True" EnableRowHoverStyle="true">
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="False" NoMasterRecordsText="暂无数据">
                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="corpName" DataType="System.String" HeaderText="企业名称"
                                    UniqueName="corpName" SortExpression="corpName" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="17%">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="姓名" SortExpression="Name" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="8%">
                                    <ItemTemplate>
                                        <a href="javascript:void(0);" onclick="ShowViewForm('<%#Eval("EmpGuid") %>')" title="点击查看人员信息">
                                            <span style="color: #43a9f5">
                                                <%#Eval("Name") %></span></a>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="IDCard" DataType="System.String" HeaderText="证件号"
                                    HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="15%"
                                    SortExpression="IDCard" UniqueName="IDCard">
                                </telerik:GridBoundColumn>
                                <telerik:GridCalculatedColumn SortExpression="Sex" HeaderText="性别" DataFields="Sex"
                                    Expression='{0}==1?"男":"女"' FooterText="CalculatedColumn footer" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="5%">
                                </telerik:GridCalculatedColumn>
                                <telerik:GridBoundColumn DataField="Tel" DataType="System.String" HeaderText="电话"
                                    SortExpression="Tel" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                    HeaderStyle-Width="10%">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="报名时间" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10%">
                                    <ItemTemplate>
                                        <%# Eval("IsrtDate") != null ? Convert.ToDateTime(Eval("IsrtDate")).ToString("yyyy-MM-dd") : ""%>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="GroupCode" DataType="System.String" HeaderText="考试时间"
                                    SortExpression="GroupCode" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                    HeaderStyle-Width="10%">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="GroupAddress" DataType="System.String" HeaderText="考试地点"
                                    SortExpression="GroupAddress" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                    HeaderStyle-Width="10%">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="操作" HeaderStyle-HorizontalAlign="Center"
                                    ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="10%">
                                    <ItemTemplate>
                                        <input type="button" class="Changebtn" onclick="Exam('<%#Eval("EmpGuid") %>',' <%#Eval("CorpUserGuid") %>')"
                                            value="考试报名" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                            <EditFormSettings>
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>
                            </EditFormSettings>
                            <PagerStyle AlwaysVisible="True"></PagerStyle>
                        </MasterTableView>
                        <PagerStyle AlwaysVisible="True" />
                        <FilterMenu EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                    <!--[if lte IE 6]> </div> <![endif]-->
                </div>
            </td>
            <td class="right_con">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td class="con_m">
                <img src="../images/left_bottom.jpg" width="19" height="24" alt="" />
            </td>
            <td colspan="2" class="con_m">
                &nbsp;
            </td>
            <td>
                <img src="../images/right_bottom.jpg" width="14" height="24" alt="" />
            </td>
        </tr>
    </table>
    <telerik:RadAjaxLoadingPanel runat="server" ID="gridLoadingPanel">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true"
        Skin="WebBlue">
    </telerik:RadWindowManager>
</asp:Content>
